1. Field of the Invention
The present invention relates to an image processing apparatus, image processing method, and computer-readable medium. Particularly, the present invention relates to an image processing technique of extracting a gradation portion from a raster image and converting it into a vector image.
2. Description of the Related Art
Recently, an opportunity to use one image information in different devices is growing. This boosts demands for higher compression ratios to reduce transmission cost between devices and higher image qualities to cope with a resolution difference between devices. User friendliness requires editability so that an image can be partially edited again. Under the circumstance, a vectorization technique is needed to convert an image expressed in the raster format into a vector format capable of easy re-editing regardless of the resolution.
However, when all colors in an image expressed in the raster format are reproduced by vectors, noise and the like are also reproduced, spoiling high image quality, high compression ratio, and re-editability which are advantages of the vector format. To prevent this, the vectorization technique requires subtractive color processing to reduce the number of colors in a raster image to a certain degree.
Japanese Patent Laid-Open No. 2006-344069 discloses a subtractive color processing method in the image vectorization technique. In this method, an image is input, and the number of colors of the input image is reduced using color similarity. The contour line of each color region is extracted and approximated by a function, and vector data is output in addition to color information. However, when a gradation region is processed, the color similarity-based subtractive color processing generates a contour between color regions which does not exist in an original image, that is, a pseudo contour, degrading the image quality.
To prevent this, Japanese Patent Laid-Open No. 2007-272456 discloses a method of determining the gradation attribute of a color region obtained by subtractive color processing, and performing vectorization corresponding to the attribute. In this method, a region determined to be identical to a given region in the above-mentioned subtractive color processing is analyzed in more detail. That is, the color change direction between pixels in each color region is detected, and the gradation attribute is determined using the result. Japanese Patent Laid-Open No. 2009-508239 discloses a method of determining a gradation region from an image and performing vectorization. In this method, the color gradient between pixels in an image is calculated, a gradation region is determined using the result, and a path having pixels of almost the same color is generated for the obtained gradation region. A perpendicular to the path is defined, a representative color value is calculated on the perpendicular, and vectorization is executed. However, this method requires arithmetic processing to calculate a color gradient in the entire image region, decreasing the speed.
Hence, a technique of quickly identifying a gradation region in an image and generating gradation parameters corresponding to the feature of the gradation region has not been proposed.
The present invention has been made to solve the above problems, and performs gradation vectorization processing quickly.